﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Data;
using DataLib.Common;
using System.Drawing;
using DataLib.Accounts.Bus;

namespace Ewts.BaseData
{
    public partial class MaterialPriceList : System.Web.UI.Page
    {



        DataLib.BLL.MaterialPrice bll = new DataLib.BLL.MaterialPrice();

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {                
                BindData();
            }
        }

        protected void BindData()
        {
            DataTable dt = new DataLib.BLL.MaterialPrice().GetList("").Tables[0];
            reptMaterial.DataSource = dt;
            reptMaterial.DataBind();
        }

        protected string GetMaName(string materialID)
        {
            string maName = "";
            DataLib.Model.Goods gModel = new DataLib.Model.Goods();
            gModel = new DataLib.BLL.Goods().GetModel(int.Parse(materialID));
            if (gModel != null)
                maName = gModel.goodsName;
            return maName;
        }

    }
}
